import {httpGet, httpPost} from '@/utils/request'


export async function listRealtimeThroughputByPipelineIds( minus:any, params?:any ){
  const { data }  = await httpGet(`/api/v1/throughput/list-realtime-throughput-by-pipeline-ids/${minus}`,params)
  return data;
}

export async function findThroughputStatByPipelineId( params?:any ){
  const { data }  = await httpGet('/api/v1/throughput/find-throughput-stat-by-pipeline-id',params)
  return data;
}

export async function listRealtimeThroughput( params?:any ){
  const { data }  = await httpGet('/api/v1/throughput/list-realtime-throughput',params)
  return data;
}

export async function listTimelineThroughput( params?:any ){
  const { data }  = await httpGet('/api/v1/throughput/list-timeline-throughput',params)
  return data;
}

export async function createOrUpdateThroughput( params?:any ){
  const { code }  = await httpPost('/api/v1/throughput/create-or-update-throughput',params)
  return code === 200;
}


export async function recentThroughputStat( params?:any ){
  const { total,data }  = await httpGet('/api/v1/throughput/recent-throughput-stat',params)
  return { total,data };
}

export async function historyThroughputStat( params?:any ){
  const { data }  = await httpGet('/api/v1/throughput/history-throughput-stat',params)
  return  data ;
}
